<?php
/*
Template Name: Timeline
*/
?><?php get_header(); ?>
<?php
if ($wp_theme_options['full_timeline']){
    $max_feat = 0;
    $max_post = 0;
    $full = true;
    $more = false;
} else {
    $max_feat = 350;
    $max_post = 300;
    $full = false;
    $more = true;
}
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('showposts=10'.'&paged='.$paged);
?>
<div id="content" class="archive">
    
    <?php if (have_posts()) : $i = 1; // the loop ?>

    <h2><?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    <?php /* If this is a category archive */ if (is_category()) { ?>				
        <?php _e("Section &raquo; "); echo single_cat_title(); ?>
 	<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<?php _e("Archive for "); the_time('F jS, Y'); ?>
    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<?php _e("Archive for "); the_time('F, Y'); ?>
    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<?php _e("Archive for "); the_time('Y'); ?>
    <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<?php _e("Blog Archives"); ?>
	<?php } //do not delete ?>
    </h2>

    <?php while (have_posts()) : the_post(); // the loop ?>
    
    <?php if($i == 1) : ?>
    <div id="feature" class="clearfix">
		<?php image_attachment('mct_sl_image', '210', '140'); ?>
	    <h3 class="title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
	    <div class="meta">By <?php the_author_posts_link(); ?> &bull; on <?php the_time('F j, Y') ?>
            <?php edit_post_link( '[Edit]', '', ''); do_action('prox_meta_archive',$post->ID); echo "&nbsp;<em>Categories: "; the_category('&middot'); ?></em></div>
	    <p><?php prox_content_limit($max_feat,'More...'); ?></p>
    </div>
    
    <?php if($wp_theme_options['adsense_468x60']) : ?>
	<!--Begin Adsense Unit-->
	<div class="adsense">
	<?php echo stripslashes($wp_theme_options['adsense_468x60']); ?>
	</div><!--end .adsense-->
	<!--End Adsense unit-->
	<?php endif; ?>
	
    <h2>More Articles</h2>
    <?php else : ?>
	    <div class="post clearfix">
	    <?php image_attachment('mct_sl_image', '100', '100'); ?>
	    <h3 class="title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
	    <div class="meta">By <?php the_author_posts_link(); ?> &bull; on <?php the_time('F j, Y') ?>
            <?php edit_post_link( '[Edit]', '', ''); do_action('prox_meta_archive',$post->ID); echo "&nbsp;<em>Categories: "; the_category('&middot'); ?></em></div>
	    <p><?php prox_content_limit($max_post,'More...'); ?></p>
            <?php if ($full){
               echo '<div class="meta"><p><em>'; the_tags('Tagged as: ',',',''); echo '</em></p></div>';
            } ?>  
            
            </div><!--end .post-->
    <?php endif; ?>

    <?php $i = $i + 1; endwhile; //end one post ?>
    
    <!-- Previous/Next page navigation -->
    <div class="page-nav">
	    <div class="nav-previous"><?php previous_posts_link(__('&larr; Previous Page')) ?></div>
	    <div class="nav-next"><?php next_posts_link(__('Next Page &rarr;')); ?></div>
    </div>   
                
	<?php else : //do not delete ?>

    <h3><?php _e("Page Not Found"); ?></h3>
    <p><?php _e("We're sorry, but the page you are looking for isn't here."); ?></p>
    <p><?php _e("Try searching for the page you are looking for or using the navigation in the header or sidebar"); ?></p>

	<?php endif; //do not delete ?>
	<?php $wp_query = null; $wp_query = $temp;?>	
</div><!--end #content-->

<!--include sidebar-->
<?php get_sidebar(); ?>

<!--include footer-->
<?php get_footer(); ?>